package com.xuecheng.content;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;

@SpringBootApplication
@EnableDiscoveryClient
//异常处理类不在同一包下，需手动指定扫描（手动指定扫描包时，默认的扫描包会取消，也许手动添加）
@ComponentScan(
        basePackages = {"com.xuecheng.content",
                        "com.xuecheng.web",
                        "com.xuecheng.mybatis"
                        })
@MapperScan("com.xuecheng.content.mappers")
@EnableFeignClients(basePackages = "com.xuecheng.*.api")//扫描Feign接口
@EnableAsync//开启springboot异步处理的支持
public class ContentApplication {
    public static void main(String[] args) {
        SpringApplication.run(ContentApplication.class,args);
    }
}
